<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:74:"D:\phpstudy_pro\WWW\eduword\public/../application/admin\view\exam\add.html";i:1588215783;s:70:"D:\phpstudy_pro\WWW\eduword\application\admin\view\layout\default.html";i:1588215783;s:67:"D:\phpstudy_pro\WWW\eduword\application\admin\view\common\meta.html";i:1588215783;s:69:"D:\phpstudy_pro\WWW\eduword\application\admin\view\common\script.html";i:1588215783;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
    <head>
        <meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    var require = {
        config:  <?php echo json_encode($config); ?>
    };
</script>
    </head>

    <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    <?php echo __('Dashboard'); ?>
                                    <small><?php echo __('Control panel'); ?></small>
                                </h1>
                            </section>
                            <?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav')): ?>
                            <!-- RIBBON -->
                            <div id="ribbon">
                                <ol class="breadcrumb pull-left">
                                    <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
                                </ol>
                                <ol class="breadcrumb pull-right">
                                    <?php foreach($breadcrumb as $vo): ?>
                                    <li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
                                    <?php endforeach; ?>
                                </ol>
                            </div>
                            <!-- END RIBBON -->
                            <?php endif; ?>
                            <div class="content">
                                <script type="text/javascript">

    function change(){
        var csubjecttype = $('#c-csubjecttype option:selected').val();
        // 类型:1=判断题,2=单项选择题,3=多选题

        if(csubjecttype==1){
            $('#true_false').css('display','block');
            $('#mult').css('display','none');
            $('#chose').css('display','none');
            $('#option').css('display','none');
        }
        if(csubjecttype==2){
            $('#true_false').css('display','none');
            $('#mult').css('display','none');
            $('#chose').css('display','block');
            $('#option').css('display','block');
        }
        if(csubjecttype==3){
            $('#true_false').css('display','none');
            $('#mult').css('display','block');
            $('#chose').css('display','none');
            $('#option').css('display','block');
        }
    }
</script>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Ctitle'); ?>:</label>
        <div class="col-xs-12 col-sm-4">
            <textarea id="c-ctitle" data-rule="required" class="form-control" rows="4" name="row[ctitle]" cols="50"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Csubjecttype'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-csubjecttype" data-rule="required" onchange="change()" class="form-control selectpicker" name="row[csubjecttype]">
                <?php if(is_array($csubjecttypeList) || $csubjecttypeList instanceof \think\Collection || $csubjecttypeList instanceof \think\Paginator): if( count($csubjecttypeList)==0 ) : echo "" ;else: foreach($csubjecttypeList as $key=>$vo): ?>
                    <option value="<?php echo $key; ?>" <?php if(in_array(($key), explode(',',""))): ?>selected<?php endif; ?>><?php echo $vo; ?></option>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </select>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">章节名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ichapterid" data-rule="required" data-field="cchaptername" data-source="chapter/index" class="form-control selectpage" name="row[ichapterid]" type="text" value="" data-primary-key='ichapterid'>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Iscore'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-iscore" data-rule="required" class="form-control" step="0.01" name="row[iscore]" type="number">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><?php echo __('Cdescription'); ?>:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-cdescription" class="form-control" rows="5" name="row[cdescription]" cols="50"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">试卷来源时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-dchangedate" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[dchangedate]" type="text" value="<?php echo date('Y-m-d H:i:s'); ?>">
        </div>
    </div>

    <div id="true_false">
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">正确答案:</label>
            <div class="col-xs-12 col-sm-8">
                <!-- 0是错，1是对 -->
                <?php echo build_radios('row[trueorfalse]', [1=>__('True'), 0=>__('False')]); ?>
            </div>
        </div>
    </div>

    <div style="display: none;" id="option">
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">选项A:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-A" class="form-control" name="row[A]" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">选项B:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-B" class="form-control" name="row[B]" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">选项C:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-C" class="form-control" name="row[C]" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">选项D:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-D" class="form-control" name="row[D]" type="text">
            </div>
        </div>

        <div id="chose">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">正确答案:</label>
                <div class="col-xs-12 col-sm-8">
                     <?php echo build_radios('row[chose_canswer]', ['A'=>'A', 'B'=>'B', 'C'=>'C', 'D'=>'D'], '', ['data-rule'=>'required']); ?>
                </div>
            </div>
        </div>
        <div id="mult">

            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">选项E:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-E" class="form-control" name="row[E]" type="text">
                </div>
            </div>

            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">正确答案:</label>
                <div class="col-xs-12 col-sm-8">
                     <?php echo Form::checkboxs('row[canswer]', ['A'=>'A', 'B'=>'B', 'C'=>'C', 'D'=>'D', 'E'=>'E'], '', ['data-rule'=>'required']); ?>
                </div>
            </div>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled"><?php echo __('OK'); ?></button>
            <button type="reset" class="btn btn-default btn-embossed"><?php echo __('Reset'); ?></button>
        </div>
    </div>
</form>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
    </body>
</html>